
import { Tools } from 'weaver-mobile';


//获取数据
export const getInitParams = params => {
    return Tools.callApi({
        url: '/api/workflow/communication/getInitParams',
        method: 'POST',
        params,
    });
};
//获取列表内容
export const getContentList = params => {
    return Tools.callApi({
        url: '/api/workflow/communication/getContentList',
        method: 'POST',
        params,
    });
};
//点赞操作
export const doApprove = params => {
  return Tools.callApi({
    url: '/api/workflow/communication/doApprove',
    method: 'POST',
    params,
  })
};
//删除交流或者评论
export const doDelete = params => {
  return Tools.callApi( {
    url: '/api/workflow/communication/doDelete',
    method: 'POST', 
    params
  })
}

//获取附加的操作按钮，如： 文档、流程、客户
export const getCoworkAppStatus = params => {
  let options  = {
    method: 'GET',
    url: '/api/cowork/base/getCoworkAppStatus',
    params: {...params}
  };
  return Tools.callApi(options);
}
//新建保存交流
export const doSaveContent = params => {
  return Tools.callApi({
    url: '/api/workflow/communication/doSaveContent',
    method: 'POST',
    params
  })
};
//交流评论保存
export const doSaveReply = params => {
  return Tools.callApi({
    url: '/api/workflow/communication/doSaveReply',
    method: 'POST',
    params
  })
};

//相关交流数据获取
export const getResource = params => {
  return Tools.callApi({
    url:'/api/workflow/communication/getResource',
    method: 'POST',
    params
  })
}
//高级搜索
export const getRequestLogList = params => {
  return Tools.callApi({
      url: '/api/workflow/reqform/getRequestLogList',
      method: 'POST',
      params,
  });
};